package com.lyt.controller;

import com.lyt.bean.Course;
import com.lyt.service.CourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class CourseContoller {

    @Autowired
    CourseService courseService;

    @RequestMapping("/course/get")
    public List<Course> getAllCourse(){
        return courseService.getAllCourse();
    }
    //    public String getAllCourse(){
//        return JSON.toJSONString(courseService.getAllCourse());
//    }
}
